package src;

import java.util.ArrayList;
import java.util.List;

public class Player {
	
	private String name;
	private int score;
	private List<RPSEnum> movementList;
	
	
	public Player(String n, List<RPSEnum> mL)
	{
		this.name = n;
		this.score = 0;
		movementList = mL;
	}
	
	public Player(String n)
	{
		this.name = n;
		this.score = 0;
		movementList = new ArrayList<RPSEnum>();
		
		for(int i = 0 ; i < 10 ; i++)
		{
			int random = (int)Math.random()*2;
			switch(random)
			{
			case 0:
				this.movementList.add(RPSEnum.ROCK);
			case 1:
				this.movementList.add(RPSEnum.PAPER);
			case 2:
				this.movementList.add(RPSEnum.SCISSORS);
			default:
					break;
			}
		}
	}

	public String getName() {
		return name;
	}

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}
	
	public int getRPSEnumLength()
	{
		return this.movementList.size();
	}
	
	public RPSEnum getNextMove()
	{
		return this.movementList.listIterator().next();
	}

}
